import {get,post,put,deletes} from '@/service/axios'

// 获取所有权限的列表
export const getRightListApi =(params)=>{
    return get(`rights/${params.type}`,params)
}
export const deleteRightApi =(params)=>{
// console.log('我是对应角色的id',params.data.id);
// console.log('我是对应权限的id',params.id);
    return deletes(`roles/${params.data.id}/rights/${params.id}`)
}

export const editRolesRightListApi =(params)=>{
    console.log(params.rids);
    console.log(params.roleId);
    return post(`roles/${params.roleId}/rights`,params)
}
